home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #4 / K-CD-4-2002.ISO / Empire Earth / EEDemo.exe / Disk1 / data.ssa / unit ai scripts_generic air movement.tai < prev    next >
Encoding:
Text File  |  2001-09-29  |  3.0 KB  |  163 lines

  1. //
  2. // Generic Air Movement unit AI file
  3. //
  4. // Behaviors:
  5. //
  6. //        Handles takeoff and landing at airports
  7. //
  8. //    Notes:
  9. //
  10. //        Doesn't handle attacks - do those in specific AI files
  11. //
  12. //    Known Problems:
  13. //
  14.  
  15. // Takeoff
  16. Takeoff
  17. {
  18.     AirportDestroyed true(Kill)
  19.     MovePreparationComplete true(Taxi)
  20. }
  21.  
  22. // Taxi
  23. Taxi
  24. {
  25.     AirportDestroyed true(Kill)
  26.     ArrivedAtMoveWaypoint true(ContinueToTaxi)
  27. }
  28.  
  29. ContinueToTaxi
  30. {
  31.     AirportDestroyed true(Kill)
  32.     WaypointInAir true(Fly)
  33.     WaypointOnGround true(Taxi)
  34.     NextWaypointRetrieved false(BoardTransport)
  35. }
  36.  
  37. // Fly
  38. Fly
  39. {
  40.     FlightTimeAlarm true(RequestLanding)
  41.     ArrivedAtMoveWaypoint true(ContinueToFly)
  42. }
  43.  
  44. ContinueToFly
  45. {
  46.     FlightTimeAlarm true(RequestLanding)
  47.     NextWaypointRetrieved true(Fly) false(Circle)
  48. }
  49.  
  50. // Circle
  51. Circle
  52. {
  53.     FlightTimeAlarm true(RequestLanding)
  54.     GoalIsExplore true(FindUnexploredArea)
  55.     allof(LocationOffMap,LocationWayOffMap) true(MoveToValidMapLocation)
  56. }
  57.  
  58. // RequestLanding
  59. RequestLanding
  60. {
  61.     AirportDestroyed    true(EmergencyTakeoff)
  62.     AlwaysTrue            true(HoldingPattern)
  63. }
  64.  
  65. // HoldingPattern
  66. HoldingPattern
  67. {
  68.     AirportDestroyed        true(EmergencyTakeoff)
  69.     HoldingPatternComputed    true(WaitForLandingClearance)
  70. }
  71.  
  72. // WaitForLandingClearance
  73. WaitForLandingClearance
  74. {
  75.     AirportDestroyed        true(EmergencyTakeoff)
  76.     LandingClearanceGranted true(Land)
  77.     ArrivedAtMoveWaypoint    true(ContinueToWaitForLandingClearance)
  78.     RequestStillValid        false(RequestLanding)
  79. }
  80.  
  81. // ContinueToWaitForLandingClearance
  82. ContinueToWaitForLandingClearance
  83. {
  84.     NextWaypointRetrieved        true(WaitForLandingClearance) false(CircleAirtrafficController)
  85. }
  86.  
  87. // CircleAirtrafficController
  88. CircleAirtrafficController
  89. {
  90.     AirportDestroyed        true(EmergencyTakeoff)
  91.     AlwaysTrue                true(WaitForLandingClearance)
  92. }
  93.  
  94. // Land
  95. Land
  96. {
  97.     MovePreparationComplete true(Descend)
  98. }
  99.  
  100. // Land
  101. RecalculateLanding
  102. {
  103.     MovePreparationComplete true(Descend)
  104. }
  105.  
  106. // Descend
  107. Descend
  108. {
  109.     AirportDestroyed true(EmergencyTakeoff)
  110.     ArrivedAtMoveWaypoint true(ContinueToDescend)
  111. }
  112. ContinueToDescend
  113. {
  114.     AirportDestroyed true(EmergencyTakeoff)
  115.     AirtrafficControllerMoved true(RecalculateLanding)
  116.     WaypointIsSameElevation true(Brake)
  117.     anyof(WaypointIsHigherElevation,WaypointIsLowerElevation) true(Descend)
  118.     NextWaypointRetrieved false(BoardTransport)
  119. }
  120.  
  121. // Brake
  122. Brake
  123. {
  124.     AirportDestroyed true(Kill)
  125.     ArrivedAtMoveWaypoint true(ContinueToBrake)
  126. }
  127. ContinueToBrake
  128. {
  129.     AirportDestroyed true(Kill)
  130.     NextWaypointRetrieved true(Brake) false(BoardTransport)
  131. }
  132.  
  133. // Enter Airport
  134. BoardTransport
  135. {
  136.     AirportDestroyed true(Kill)
  137.     BoardedTransport true(Idle)
  138. }
  139.  
  140. // Moving
  141. PrepareToMove
  142. {
  143.     MovePreparationComplete true(Fly)
  144. }
  145.  
  146. MoveToValidMapLocation
  147. {
  148.     AlwaysTrue true(PrepareToMove)
  149. }
  150.  
  151. FindUnexploredArea
  152. {
  153.     SearchingForAreaToExplore true(FindUnexploredArea)
  154.     NoUnexploredAreasLeft true(Circle) false(PrepareToMove)
  155. }
  156.  
  157. // we've reached the end of the path
  158. ReacquireGoal
  159. {
  160.     AlwaysTrue true(ShouldIReturnToInitialContactLocation)
  161. }
  162.  
  163.